#ifndef CUSTOMGROUPBOX_H
#define CUSTOMGROUPBOX_H
#include <QGroupBox>
#include <QPropertyAnimation>
#include <QGraphicsColorizeEffect>

#include "Logger/logger.h"

/* ---------------------------
  | Class like a QGroupBox, but
  |     has CheckBox in header &
  |     can enroll onClick.
   -------------------------- */

class CustomGroupBox : public QGroupBox
{
    Q_OBJECT
public:
    CustomGroupBox(){}
    CustomGroupBox(QWidget *parent);

    void setup(QEasingCurve inCurve, QEasingCurve outCurve);

    void setChanged(const bool changed);

public slots:
    void showAll();
    void hideAll();

private slots:
    void gotClick(bool checked);

private:
    QRect *mGeo;
    QPropertyAnimation *mAni;
    QGraphicsColorizeEffect *mEffect;

    bool mHasChanges;
};

#endif // CUSTOMGROUPBOX_H
